package cn.edu.zucc.GUIUtil;

import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class ImagePanel extends JPanel {

	private static final long serialVersionUID = 1L;
	
	private ImageIcon imgBg;
	
	public ImagePanel(String ImagePath){
		super();
		this.imgBg = new ImageIcon(ImagePath);;
		
	}
	@Override
	protected void paintComponent(Graphics g) {
	    super.paintComponent(g);
	    g.drawImage(imgBg.getImage(), 0, 0, null);
	}
}
